package com.kaishengit.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaishengit.dao.SalesRecordsDao;
import com.kaishengit.pojo.Customer;
import com.kaishengit.pojo.SalesRecords;

@Service
@Transactional
public class SalesRecordsService {

	private SalesRecordsDao salesRecordsDao;
	
	public List<SalesRecords> findAll() {
		return salesRecordsDao.findAll();
	}
	
	public SalesRecords findById(String id) {
		return salesRecordsDao.findById(id);
	}
	public List<SalesRecords> findByCustomerid(Customer customer) {
		return salesRecordsDao.findByCustomerid(customer);
	}
	
	@Autowired
	public void setSalesRecordsDao(SalesRecordsDao salesRecordsDao) {
		this.salesRecordsDao = salesRecordsDao;
	}


	
	
}
